home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / Library / Manuels & Misc / Assembly / AOA.ZIP / CH18 / KEYCNTAP.ASM < prev    next >
Encoding:
Assembly Source File  |  1994-07-14  |  766 b   |  38 lines

  1. ; This is the companion program to the keycnt TSR.
  2. ; This program calls the "MyInt16" routine in the TSR to
  3. ; determine the number of keyboard interrupts.  It displays
  4. ; the approximate number of keystrokes (keyboard ints/2)
  5. ; and quits.
  6.  
  7.         .xlist
  8.         include     stdlib.a
  9.         includelib    stdlib.lib
  10.         .list
  11.  
  12. cseg        segment    para public 'code'
  13.         assume    cs:cseg, ds:nothing
  14.  
  15. Main        proc
  16.         meminit
  17.  
  18.         print
  19.         byte    "Approximate number of keys pressed: ",0
  20.         mov    ah, 0FFh
  21.         int    16h
  22.                 shr    ax, 1            ;Must divide by two.
  23.         putu
  24.         putcr
  25.         ExitPgm
  26.  
  27. Main        endp
  28. cseg        ends
  29.  
  30. sseg        segment    para stack 'stack'
  31. stk        db    1024 dup ("stack   ")
  32. sseg        ends
  33.  
  34. zzzzzzseg    segment    para public 'zzzzzz'
  35. LastBytes    db    16 dup (?)
  36. zzzzzzseg    ends
  37.         end    Main
  38.